package com.itheima.bos.dao.base;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.itheima.bos.domain.base.Courier;

public interface CourierRepository extends JpaRepository<Courier, Integer>,
		JpaSpecificationExecutor<Courier>{

	/*
	 * 自定义修改快递员作废的方法
	 */
	@Query(value="update Courier set deltag = '1' where id = ?")
	@Modifying
	public void updateDelTag(Integer id);

	@Query(value="update Courier set deltag = '' where id = ?")
	@Modifying
	public void restoreDelTag(Integer id);

}
